#include<stdio.h> 
int main(){
	int arr[]={'rat''ox''tiger''rabbit''dragon''snake''horse''sheep''monkey''rooster''dog''pig'}
	int y;
	scanf("%d",&y);
	if(y>1900)
	arr[12]=(y-1900)%12-1;
	printf("%d",arr[12]);
	if (y<1900)
	arr[12]=(1900-y)%12+8;
	printf("%d",arr[12]);
	return 0;
}
